//
//  ITWebViewController.h
//  InTubePro
//
//  Created by seven on 2020/2/6.
//  Copyright © 2020 seven. All rights reserved.
//

#import "BaseViewController.h"
#import <WebKit/WebKit.h>
NS_ASSUME_NONNULL_BEGIN

@protocol ITWebViewProtocol <NSObject>
@optional
-(void)viewOnScreenDuration:(double)duration;
-(void)findIFSC:(NSString *)ifsc;
-(void)closeWebView;
@end


@interface ITWebViewController : BaseViewController


IT_PROPERTY_STRONG WKWebView *wkWebView;
IT_PROPERTY_STRONG UIProgressView *progressView;

IT_PROPERTY_STRONG NSString *URLString;

IT_PROPERTY_STRONG NSURL *URLToLaunchWithPermission;
IT_PROPERTY_STRONG UIAlertController *externalAppPermissionAlert;

IT_PROPERTY_ASSIGN long duration;
IT_PROPERTY_ASSIGN BOOL loadError;

IT_PROPERTY_ASSIGN CGFloat loadtime;

@property(nonatomic, copy) NSString *navTitle;
@property(nonatomic, copy) NSString *source;

@property(nonatomic, assign) id<ITWebViewProtocol> delegate;



+ (instancetype)openUrl:(NSString *)url;

- (void)loadURLString:(NSString *)URLString;

- (void)viewAppear;
- (void)viewDisAppear;


- (void)reloadView;

- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation;
@end

NS_ASSUME_NONNULL_END
